package com.cjm.one.model.goods.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @description: 库存回滚DTO

 **/
@AllArgsConstructor
@Data
public class StockRevertDTO {
    @Schema(description = "SKU ID")
    @NotNull(message = "SKU ID不能为空")
    private Long skuId;
    @Schema(description = "扣减数量")
    @Min(value = 1, message = "回滚的数量必须大于0")
    private Integer quantity; // 需要回滚的数量
    @Schema(description = "版本号")
    private Long version;
}